﻿<%@ Page Title="原料分类管理" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RawTypeManage.aspx.cs" Inherits="StoragePeriod.Web.SysManage.RawTypeManage" %>
<%@ Register src="UC_Menu.ascx" tagname="UC_Menu" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
    .layout{ background:url(../images/images_59.jpg) no-repeat;}
    .left-cloumn{display:none;}
    .right-cloumn{width:944px;}
    #sms_title_li_0{ background:url(../images/images_55.jpg) no-repeat;}
    .Left_Search{width:190px;padding-left:10px; height:30px;border-top:1px solid #ccc;}
    .right_Stafflist{ overflow:auto;}
</style>
<script type="text/javascript">
    $(document).ready(function () {
        $("#MainContent_tvRawView input[type='checkbox']").click(function () {
            if ($(this).attr("checked")) {
                $(this).parents("table").nextAll("div:first").find("input[type='checkbox']").attr("checked", true);
            }
            else {
                $(this).parents("table").nextAll("div:first").find("input[type='checkbox']").attr("checked", false);
            }
        });
    });

    function IsVerification() {
        if ($("#MainContent_Drop_RawType").val() == null) {
            alert("请选择分类！");
            return false;
        }
        return true;
    }

    function ShowDlg(isEdit) {
        $("#MainContent_HidIsEdit").val(isEdit);
        if (isEdit == 0) {
            $("#MainContent_txt_RawTypeName").val("");
        }
        $("#dialog-form").dialog('open');
    }

    function LoadData(strName) {
        $("#MainContent_txt_RawTypeName").val(strName);
    }

    function IsV() {
        var b = true;
        if ($("#MainContent_txt_RawTypeName").val() == "") {
            b = false;
            alert("请输入类别名称！");
        }
        return b;
    }
    function alertstr(str) {
        alert(str);
        
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainLeft" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<asp:UpdatePanel ID="upPanelMain" runat="server">
        <ContentTemplate>

<asp:HiddenField ID="HidIsEdit" runat="server" Value="0" />
<asp:HiddenField ID="HidTypeID" runat="server" Value="" />


<div class="sms_title">
    <ul>
        <li><a href="OperationManage.aspx"  style="color:#f90;">基础设置</a></li>
        <li><a href="PrivilegeManage.aspx">权限管理</a></li>
        <li><a href="PersonnelManage.aspx">人员管理</a></li>
        
    </ul>
</div>
<div class="sms_main">
    <div class="BasicData_left">
        <h2>基础数据管理</h2>
        <uc1:UC_Menu ID="UC_Menu1" runat="server" ShowId=3 />
    </div>
    
    <div class="BasicData_right">
        
        <div class="BasicDataBtn">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td align="right"><input type="button" id="Btn_TypeAdd" value="添加" class="btn_0" onclick="ShowDlg(0)" /></td>
                    <td style="width:10px;"></td>
                </tr>
            </table>
        </div>

        <div class="BasicDataList">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="BasicDataTable">
                <thead>
                    <tr>
                        <td style="width:60px;">序号</td>
                        <td>类别名称</td>
                        <td style="width:60px;">原料细类</td>
                        <td style="width:60px;">编辑</td>
                        <td style="width:60px;">删除</td>    
                    </tr>
                </thead>
                <tbody>
                    <asp:Repeater ID="RepDataList" runat="server" onitemcommand="RepDataList_ItemCommand">
                        <ItemTemplate>
                            <tr>
                                <td><%=GetXH()%></td>
                                <td><%#Eval("TypeName")%></td>
                                <td><a href="RawTypeInfoManage.aspx?Pid=<%#Eval("id")%>&TypeId=<%=Request.QueryString["TypeId"].ToString()%>"><img src="../Images/sz03.png" width="16" height="16"/></a></td>
                                <td><asp:Button ID="RepBtn_Edit" CssClass="RepBtn_Edit" runat="server" CommandName="Edit" CommandArgument=<%#Eval("id")%> /></td>
                                <td><asp:Button ID="RepBtn_Del" CssClass="RepBtn_Del" runat="server" OnClientClick="return confirm('是否删除？');" CommandName="Del" CommandArgument=<%#Eval("id")%> /></td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>
        </div>
        
    </div>

</div>
<div class="sms_foot">
<asp:HiddenField ID="hdRoleCode" runat="server" />
    <img src="../images/images_58.jpg" width="944" height="8" class="float_left" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="sp-dialog-box" id="dialog-form" style=" width:350px;" title="添加原料分类">
    <table class="sp-input-table " border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                类别名称：
            </td>
            <td>
                <asp:TextBox runat="server" class="text ui-widget-content ui-corner-all" ID="txt_RawTypeName" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button Text="提交" CssClass="die" runat="server" ID="btPost" OnClientClick="return IsV()" OnClick="btPost_Click" />
            </td>
        </tr>
    </table>
</div>
</asp:Content>